package com.codes.core.utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Date 2020/5/28 16:59
 * @Created by peanut
 */
public class TimeUtil {




    public static Long getMin(String sdate,String edate) throws ParseException {

        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmm");

        Date start = simpleDateFormat .parse(sdate);

        Date end = simpleDateFormat .parse(edate);

        long between = (end.getTime() - start .getTime())/1000;

        long min = between/60;

        return min;

    }

}